import {uniFetch} from './uni-fetch.js'
export default{
  list(status=1,page=1,size=10){
    return uniFetch.get('/driver/tasks/list',{status,page,size})
  },
  detail(id){
    if(!id) return
    return uniFetch.get(`/driver/tasks/details/${id}`)
  },
  pickup(data) {
    if (!data.id) return
    return uniFetch.post('/driver/tasks/takeDelivery', data)
  },
  deliver(data) {
    if (!data.id) return
    return uniFetch.post('/driver/tasks/deliver', data)
  },
  delay(data) {
    if (!data.id) return
    return uniFetch.put('/driver/tasks/delay', data)
  },
  record(data){
    if(!data.id) return
    return uniFetch.post('/driver/tasks/truckRegistration',data)
  }
}
